package com.emagic.manage.modules.main.domain;

import com.emagic.manage.data.entities.response.OutOffResponse;
import com.emagic.manage.data.repository.Repository;
import com.emagic.manage.mvp.domain.UseCase;

import javax.inject.Inject;

import rx.Observable;

/**
 * Created by xiatian on 2017/11/1.
 */

public class GetOutOffUserCase extends UseCase<OutOffResponse> {

    private Repository mRepository;
    private String userid;
    private String sessionid;

    public void setUserid(String userid) {
        this.userid = userid;
    }

    public void setSessionid(String sessionid) {
        this.sessionid = sessionid;
    }

    @Inject
    public GetOutOffUserCase(Repository repository) {
        this.mRepository = repository;
    }

    @Override
    protected Observable<OutOffResponse> buildObservable() {
        return mRepository.logOut(userid, sessionid);
    }
}
